Neural network powered codec

ABSTRACT

Training a video decoder system comprising, generating at least two sets of video encoding parameters wherein the at least two sets of video encoding parameters are valid, masking a set of the at least two sets of encoding parameters with invalid values to generate an invalid set of video encoding parameters, providing a set of the at least two sets of video encoding parameters to a neural network, training the neural network to predict valid video encoding parameter values for the invalid set using an iterative training algorithm, determining which encoding parameters need to be encoded based on analysis of a prediction error of the trained recurrent neural network, dropping the encoding parameters from the encoded data which are determined to be accurately predicted by the trained recurrent neural network, encoding a new video stream without the dropped encoding parameters. A coder and decoder system with neural network is also disclosed.

FIELD OF THE INVENTION

The present disclosure relates to encoding and decoding video streams.More specifically the present disclosure is related to encoding anddecoding a video stream using neural networks.

BACKGROUND OF THE INVENTION

Digital signal compression is widely used in many multimediaapplications and devices. Digital signal compression using acoder/decoder (codec) allows streaming media, such as audio or videosignals to be transmitted over the Internet or stored on compact discs.A number of different standards of digital video compression haveemerged, including H.261, H.263; DV; MPEG-1, MPEG-2, MPEG-4, VC1; andAVC (H.264). These standards, as well as other video compressiontechnologies, seek to efficiently represent a video frame picture byeliminating or reducing spatial and temporal redundancies within a givenpicture and/or among successive pictures. Through the use of suchcompression standards, video contents can be carried in highlycompressed video bit streams, and thus efficiently stored in disks ortransmitted over networks.

Many codecs make use of different types of coding of frames. Examples ofdifferent frame coding formats include Intra-coded frames (I-frames),predictive coded frames (P-frames) and bi-predictive coded frames(B-frames). In general terms, an I-frame is coded without reference toany other frame. An I-frame can be decoded independent of the decodingof any other frames. I-frames may be generated by an encoder to create arandom access point that allows a decoder to start decoding properly atthe location of the I-frame. I-frames generally require more bits toencode than P-frames or B-frames.

P-frames are coded with reference to one or more other frames, such asan I-frame or another P-frame. A P-frame contains changes in the imagefrom one or more previous frames. Decoding a P-frame requires theprevious decoding of one or more other frames. P-frames require fewerbits to encode than I-frames. B-frames are similar to P-frames butcontain image differences with respect to both previous and subsequentframes. B-frames can be coded in some prediction modes that form aprediction of a motion region within the frame by averaging thepredictions obtained using two different previously-decoded referenceregions. B-frames require fewer bits to encode than I-frames orP-frames.

The coding of video streams into bitstreams that contain I-frames fortransmission over the Internet is subject to certain problems. Oneproblem is compression delay. Even though an I-frame typically requiresmore bits than a P-frame or B-frame it takes more time to compress andencode a video image as a P-frame or B-frame than as an I-frame. Anotherproblem is referred to as bit-rate jitter. Because I-frames consume muchmore bit counts than P-frames or B-frames, the bit rate for producingencoded pictures is uneven. Additionally for each section severaldifferent parameters must be encoded within the video stream to enableproper decoding. These parameters are additional bits that must be addedto the encoded video stream and thus increase the size of the encodedbit stream. It would be more desirable to have a smaller bit stream anda thus a smoother bit rate.

A field of recent development that has had an impact on a wide range ofother fields is neural networks (NN). Neural networks have been appliedsuccessfully in a myriad of fields including image recognition, voicerecognition and handwriting recognition as well as stock marketprediction. A neural network at its simplest level is a series of nodeswith transition weights and internal biases. An input, referred to as afeature, is provided to the neural net. When the neural network is beingtrained the input will have a desired result, called a label. To trainthe neural network to produce the correct label for the feature theweights are adjusted using a cost function over numerous attempts untilthe label is given correctly for the particular feature. A common typeof neural network used in applications such as image recognition andstock market prediction is the recurrent neural network (RNN). The RNNadds a second output to the typical node network design; this secondoutput may simply be a repetition of the node itself. The second outputrepresents an added memory component which allows the network tomaintain unbounded history information about the features and relatedlabels. This repetition may be thought of as an additional hidden nodelayer which has the same transition weights and biases as the previouslayer.

It is within this context that aspects of the present disclosure arise.

BRIEF DESCRIPTION OF THE DRAWINGS

The teachings of the present invention can be readily understood byconsidering the following detailed description in conjunction with theaccompanying drawings, in which:

FIG. 1A is a schematic diagram illustrating one possible division of astreaming data picture within the context of embodiments of the presentinvention.

FIG. 1B is a schematic diagram illustrating one possible node layout fora recurrent neural network according to aspects of the presentdisclosure.

FIG. 1C is a schematic diagram illustrating an unrolled recurrent neuralnetwork according to aspects of the present disclosure

FIG. 2 is a block diagram depicting the method for training abi-predictive neural network according to aspects of the presentdisclosure.

FIG. 3 is a block diagram depicting the method for training a predictiveneural network according to aspects of the present disclosure.

FIG. 4 is a flow diagram illustrating a neural network enhanced digitalpicture encoding that may be used in conjunction with embodiments of thepresent invention.

FIG. 5 is a flow diagram illustrating the general process flow instreaming neural network enhanced data decoding that may be used inconjunction with embodiments of the present invention.

FIG. 6 is a block diagram illustrating an apparatus for neural networkencoding and/or decoding a digital picture according to an embodiment ofthe present invention.

DESCRIPTION OF THE SPECIFIC EMBODIMENTS

Although the following detailed description contains many specificdetails for the purposes of illustration, anyone of ordinary skill inthe art will appreciate that many variations and alterations to thefollowing details are within the scope of the invention. Accordingly,the exemplary embodiments of the invention described below are set forthwithout any loss of generality to, and without imposing limitationsupon, the claimed invention.

Introduction

Embodiments of the present invention implement a new encoding protocolwhich includes the use of one or more trained neural networks to reducethe amount of information that is included within the encoded bitstream. The trained neural network may allow the codec to predictencoding parameters from previous encoding parameters. Thus according toaspects of the present disclosure encoding parameters that areaccurately predicted by the neural network may not be encoded andincorrectly predicted parameters may be corrected by an encoding errorstream encoded within the bit stream.

The proposed protocol uses first and second neural networks. Both thefirst and second neural networks are capable of predicting encodingparameters using other encoding parameters as inputs. However, the inputof the first neural network (NN) is different from that of the secondNN.

To better appreciate certain aspects of the present disclosure it isuseful clarify some terms before discussing the inputs of the first andthe second NN. A conventional video encoder can compress a videosequence into a coded stream. In the coded stream, the original inputvideo pixels are represented by a sequence of encoded parameters, suchas MB type, intra prediction type, motion vector and DCT coefficient. Atime concept can be used to describe the order between parameters.Specifically, if parameter A is placed closer to the beginning of thevideo sequence than parameter B, parameter A is said to be beforeparameter B. Otherwise, parameter A is said to be after parameter B.

For the first NN, the input includes both parameters before and afterthe current parameter to be predicted. For the second NN, the input onlyhas parameters before the current parameter to be predicted. This issimilar to a predictive (P) picture and bi-predictive (B) picture in acoded video stream. A P picture only uses reference pictures before thecurrent picture. A B picture uses reference pictures both before andafter the current picture. Because the first NN receives input from bothbefore and after the current parameter that is to be predicted, theprediction result of the first NN is better than that of the second NN.But, similar to B picture prediction, because the first NN depends onfuture parameters as inputs, the usage of the first NN is limited byavailability of future parameters.

Both the first NN and the second NN could be used to improve videocoding efficiency by predicting coded parameters. Because only earlierparameters are expected as the input, the input is always available forthe second NN without reordering the original coded video stream. But,to enable first NN prediction, some future parameters must be availablebefore the first NN starts prediction. Just as a P picture must beavailable as a reference for a B picture, the prediction result of thesecond NN could be used as the input of the first NN. But, the output ofthe first NN cannot be used as the input of the second NN. Forconvenience, it is useful herein to refer a neural network like thefirst NN as being “bi-predictive” and to refer to a neural network likethe second NN as being “predictive”.

If both the first NN and the second NN are used together, someparameters could be predicted by the first NN and some parameters couldbe predicted by the second NN. No parameter is predicted by both.Similarly some pictures are coded as P picture and some pictures arecoded as B picture, but, no picture is coded as both P and B.

In general, too many second NN predictions decreases the predictionaccuracy. Too many first NN predictions decreases the number ofavailable input parameters of both first and second NN and could alsodecrease the prediction accuracy. It is important to find out an optimalcombination of first and second NN to achieve the best overallprediction accuracy. For example, the second NN could predict DCTcoefficients. Then, both before and after DCT coefficients will beavailable to the first NN for other parameter predictions. Please notethat the first NN can only use available parameters as inputs. Even ifall DCT coefficients are available, not all future parameters arenecessarily available. For example, when MB coding type of MB1 is theprediction target of the first NN, MB coding type of MB0 is availablebut MB code type of MB2 is not available. However, the DCT coefficientsof MB2 are available. In one implementation, the same data set format isprepared for both first NN and second NN. According to parameteravailability, non-available parameters are masked out with specialinvalid values. After prediction, the prediction error will be entropycompressed as the final encoding result. To make the decoding processsmoother, the prediction error may be reordered before it is stored ortransmitted. With each picture as one unit, the prediction error of thesecond NN may be stored or transmitted first, and then the predictionerror of the first NN may be stored or transmitted. On the decoder side,the second NN is executed before the first NN.

To facilitate understanding in light of existing video encoding methods,even if the final encoded stream order is different from a conventionalencoder output order, the present disclosure still uses the conventionalencoder output order to specify “before” and “after” relationshipsbetween encoding parameters.

To better understand the terminology regarding picture encoding thesegmentation of screen space will be discussed with respect to FIG. 1A.FIG. 1A, depicts a single picture 100 (e.g., a digital video frame) maybe broken down into one or more sections. As used herein, the term“section” can refer to a group of one or more pixels within the picture100. A section can range from a single pixel within the picture, up tothe whole picture. Non-limiting examples of sections include slices 102,macroblocks 104, sub-macroblocks 106, blocks 108 and individual pixels110. As illustrated in FIG. 1A, each slice 102 contains one or more rowsof macroblocks 104 or portions of one or more such rows. The number ofmacroblocks in a row depends on the size of the macroblocks and the sizeand resolution of the picture 100. For example, if each macroblockcontains sixteen by sixteen pixels then the number of macroblocks ineach row may be determined by dividing the width of the picture 100 (inpixels) by sixteen. Each macroblock 104 may be broken down into a numberof sub-macroblocks 106. Each sub-macroblock 106 may be broken down intoa number of blocks 108 and each block may contain a number of pixels110. By way of example, and without limitation of the invention, in acommon video coding scheme, each macroblock 104 may be broken down intofour sub-macroblocks 106. Each sub-macroblock may be broken down intofour blocks 108 and each block may contain a four by four arrangement ofsixteen pixels 110.

The Neural Network Enhanced Encoding

According to aspects of the present disclosure the inclusion of encodingparameters e.g., motion vectors, intra prediction mode motion vectorsand transform coefficients may be reduced through the use of a neuralnetwork trained predict the encoding parameters of a next frame from theencoding parameters of the current frame and/or previous frames and/orencoding parameters of the current frame could be predicted from otherencoding parameters of the current frame. The encoding system may carryout an encoding scheme for a current section that derives encodingparameters through standard means as detailed below, the encodingparameters may then be provided to a neural network trained to predictthe next set of encoding parameters from the current set of encodingparameters (hereinafter referred to as the second NN). The system maythen derive the encoding parameters for the next section of theun-encoded video stream and check the results of the prediction of theencoding parameters for the next section made by the NN. If theprediction was accurate the system will not include the encodingparameters in the coded bit stream. If the prediction was not accuratethe system may include the encoding parameter in the bit stream. In someembodiments the difference between the encoding parameter predicted bythe neural network and the actual encoding parameter derived by thestandard encoding process (hereinafter referred to as the encodingerror) is included in the coded bitstream when the prediction is notaccurate. In this way a reduced set of encoding parameters may beincluded within the coded bitstream and thus the memory footprint of avideo stream may be reduced.

According to additional aspects of the present disclosure another neuralnetwork (hereinafter referred to as the first NN because in the trainingprocess this neural network may be trained first) trained to predict theencoding parameters for a current section from parameter values for aprevious section and a next section may be provided for additionalaccuracy. The previous and next section encoding parameters used asinputs for the first NN may be generated from the results of the secondNN plus the encoding error. The first neural network may then predictmissing parameter values for the current section from the set ofprevious and next section parameter values generated by the second NN.As described above with respect to the second NN, the result of thisprediction may be compared with the actual encoding parameters of thenext section derived from the encoding process. If the encodingparameters that were predicted by the first NN are correct then they maybe dropped from the coded bitstream and as before if the predictedparameter values are incorrect then the actual encoding parameters willbe included in the coded bit stream or alternatively the encoding errorwill be included.

The neural network may be any type known in the art but preferably theneural network is a Recurrent Neural Network (RNN). The RNN may be aconvolutional RNN (CRNN). In an alternative embodiment the RNN is a longshort term memory (LSTM) RNN of any type.

FIG. 1B depicts a The Basic form of an RNN is a layer of nodes 120having an activation function S, one input weight U, a recurrent hiddennode transition weight W, and output transition weight V. It should benoted that the activation function may be any non-linear function knownin the art and is not limited to the Tan h function, for example theactivation function S may be a Sigmoid or ReLu function. Unlike othertypes of neural networks RNNs have one set of activation functions andweights for the entire layer. As shown in FIG. 1C the RNN may beconsidered as a series of nodes 120 which have the same activationfunction moving through time T and T+1. Thus the RNN maintainshistorical information by feeding the result from a previous time T to acurrent time T+1. In some embodiments a convolutional RNN may be used. Aconvolutional RNN will have several different node layers connected,with the outputs of a first node layers connected to the input of asecond node layer and so on, forming a hierarchical structure. Anothertype of RNN that maybe used is a LSTM Neural Network which adds a memoryblock in a RNN node with input gate activation function, output gateactivation function and forget gate activation function resulting in agating memory that allows the network to retain some information for alonger period of time as described by Hochreiter & Schmidhuber “LongShort-term memory” Neural Computation 9(8):1735-1780 (1997).

Training the Neural Network

FIG. 2 depicts the method 200 for training a new neural network torecognize and correctly predict encoding parameters. Training the neuralnetwork (NN) begins with initialization of the weights of the NN 210.The initial weights depend on the type of activation function and numberof inputs to the node. The initial weights for an NN cannot be 0 becausethat would result in asymmetric calculations in the hidden layers. Ingeneral the initial weights should be distributed randomly. For examplean NN with a tan h activation function should have random valuesdistributed between

$- \frac{1}{\sqrt{n}}$and

$\frac{1}{\sqrt{n}}$where n is the number of inputs to the node.

The NN may have any number of states. In a general NN each hidden stateis provided every feature as its input and produces an output as largeas the label space. In a CRNN the label space is reduced by the additionof extra node layers with a reduced number of nodes compared to theprevious layer. In some embodiments the label space for encodingparameter values is a 4 bit small unsigned integer plus a sign bit. Forparameter values large than 4 bits the parameter may be encoded in thestream directly without prediction.

Once the NN has been initialized with random values it may be trainedwith feature data. It should be noted that the form of the training datafor both neural net types should closely match the form of the data thatwill be sent and received when the system is actually performingencoding/decoding functions. This is particularly the case when the sameNN is used by the encoder and decoder. In such cases, the decoder sideNN is expected to output the same result as the encoder side NN.According to aspects of the present disclosure a first NN may be trainedto predict correct encoding parameters from a previous section and anext section's encoding parameters.

To train the first NN to predict encoding parameters for a currentsection from a previous and next section, arrays of video encodingparameters must be created 220. Each array includes encoding parametersfor each section of a video stream arranged by time stamp from theprevious section up to a future section. These arrays may be generatedby the encoding parameter generation method described above. The featuredata for the first NN contains labels for each section in the videostream up to the next section and therefore at least one type ofencoding parameter for the current section must be masked with invalidvalues 230. In some instances not every encoding parameter for abitstream may be available; in this case, all future encoding parameterspast the next section are masked with invalid values. The first NN isthen provided with the encoding parameter array including the maskedencoding parameters as feature data. The labels predicted by the NN forthe masked array are compared to the actual encoding parameters and theNN is trained with a standard backpropagation algorithm with stochasticgradient descent 240.

After each round of training 240 a different encoding parameter type maybe masked and the previously masked parameter may be unmasked. In thisway the first NN may be trained to recognize and predict every type ofencoding parameter for a current section from the parameters of theprevious and next sections. Similarly the first NN may be trained topredict a missing parameter value of a current section from otherparameter values of the current section and/or a previous and nextsection It should be understood that multiple encoding parameters for acurrent section may be masked or all parameters for the current sectionmay be masked during the course of training. Additionally in someembodiments during training the next section may have the encodingparameters of the type to be predicted, masked. Training of the first NNwill cease after there is no longer an improvement in the error rate ofprediction. In some embodiments an output token may replace actualparameter values.

From an examination of node input, output, and transition weights of thefirst NN it can be determined which encoding parameters can be predictedaccurately using the other encoding parameters. Furthermoremeta-analysis of the weights and biases of the NN may be used todetermine the importance of an encoding parameter type in prediction ofother encoding parameter types.

FIG. 3 depicts a method for training a second NN. Similar to the firstNN, the second NN may be trained to predict the encoding parameters of anext section using back propagation with stochastic gradient descentaccording to the method 300. The second neural network is firstinitialized with random values 310 in the same way as discussed withFIG. 2 above. The second neural network is provided with an arraycontaining each type of encoding parameter for each section up to acurrent section 320. The next section of the array of encodingparameters may be masked invalid values 330 and the array of invalidvalues may be provided to the neural network. The correct label is theencoding parameters for the next section which is known from theencoding parameter generation method as described below. Backpropagationthrough time with stochastic gradient descent is used to develop thecorrect weights and biases for the second neural network 340. Severaliterations of training are performed until there is no longer areduction in the error rate of prediction. After training the NN willproduce valid encoding parameters for the next section.

The Neural Network Encoding Method

Digital pictures may be encoded according to a generalized method 400 asillustrated in FIG. 4. The encoder receives a plurality of digitalimages 401 and encodes each image. Encoding of the digital picture 401may proceed on a section-by-section basis. The encoding process for eachsection may optionally involve padding 402, image compression 404 andpixel reconstruction 406. To facilitate a common process flow for bothintra-coded and inter-coded pictures, all un-decoded pixels within acurrently processing picture 401 are padded with temporary pixel valuesto produce a padded picture, as indicated at 402. The padded picture isadded to a list of reference pictures 403 stored in a buffer. Paddingthe picture at 402 facilitates the use of the currently-processingpicture as a reference picture in subsequent processing during imagecompression 404 and pixel reconstruction 406. Such padding is describedin detail in commonly-assigned U.S. Pat. No. 8,218,641, which isincorporated herein by reference.

As used herein, image compression refers to the application of datacompression to digital images. The objective of the image compression404 is to reduce redundancy of the image data for a give image 401 inorder to be able to store or transmit the data for that image in anefficient form of compressed data. The image compression 404 may belossy or lossless. Lossless compression is sometimes preferred forartificial images such as technical drawings, icons or comics. This isbecause lossy compression methods, especially when used at low bitrates, introduce compression artifacts. Lossless compression methods mayalso be preferred for high value content, such as medical imagery orimage scans made for archival purposes. Lossy methods are especiallysuitable for natural images such as photos in applications where minor(sometimes imperceptible) loss of fidelity is acceptable to achieve asubstantial reduction in bit rate.

Examples of methods for lossless image compression include, but are notlimited to Run-length encoding—used as default method in PCX and as oneof possible in BMP, TGA, TIFF, Entropy coding, adaptive dictionaryalgorithms such as LZW—used in GIF and TIFF and deflation—used in PNG,MNG and TIFF. Examples of methods for lossy compression include reducingthe color space of a picture 401 to the most common colors in the image,Chroma subsampling, transform coding, and fractal compression.

In color space reduction, the selected colors may be specified in thecolor palette in the header of the compressed image. Each pixel justreferences the index of a color in the color palette. This method can becombined with dithering to avoid posterization. Chroma subsampling takesadvantage of the fact that the eye perceives brightness more sharplythan color, by dropping half or more of the chrominance information inthe image. Transform coding is perhaps the most commonly used imagecompression method. Transform coding typically applies a Fourier-relatedtransform such as a discrete cosine transform (DCT) or the wavelettransform, followed by quantization and entropy coding. Fractalcompression relies on the fact that in certain images, parts of theimage resemble other parts of the same image. Fractal algorithms convertthese parts, or more precisely, geometric shapes into mathematical datacalled “fractal codes” which are used to recreate the encoded image.

The image compression 404 may include region of interest coding in whichcertain parts of the image 401 are encoded with higher quality thanothers. This can be combined with scalability, which involves encodingcertain parts of an image first and others later. Compressed data cancontain information about the image (sometimes referred to as metainformation or metadata) which can be used to categorize, search orbrowse images. Such information can include color and texturestatistics, small preview images and author/copyright information.

By way of example, and not by way of limitation, during imagecompression at 404 the encoder may search for the best way to compress ablock of pixels. The encoder can search all of the reference pictures inthe reference picture list 403, including the currently padded picture,for a good match. If the current picture is coded as an intra picture,only the padded picture is available in the reference list. The imagecompression at 404 produces a motion vector MV and transformcoefficients 407 that are subsequently used along with one or more ofthe reference pictures (including the padded picture) during pixelreconstruction at 206.

The image compression 404 generally includes a motion search MS for abest inter prediction match, an intra search IS for a best intraprediction match, an inter/intra comparison C to decide whether thecurrent macroblock is inter-coded or intra-coded, a subtraction S of theoriginal input pixels from the section being encoded with best matchpredicted pixels to calculate lossless residual pixels 405. The residualpixels then undergo a transform and quantization XQ to produce transformcoefficients 407. The transform is typically based on a Fouriertransform, such as a discrete cosine transform (DCT). For existing videostandards, if an intra picture is to be coded, the motion search MS andinter/intra comparison C are turned off. However, in some embodiments ofthe present invention, if the padded picture is available as areference, these functions are not turned off. Consequently, the imagecompression 204 may be the same for intra-coded pictures and inter-codedpictures.

The motion search MS may generate a motion vector MV by searching thepicture 401 for a best matching block or macroblock for motioncompensation as is normally done for an inter-coded picture. If thecurrent picture 401 is an intra-coded picture, codecs typically do notallow prediction across pictures. Instead all motion compensation isnormally turned off for an intra picture and the picture coded bygenerating transform coefficients and performing pixel prediction. Insome alternative implementations, however, an intra picture may be usedto do inter prediction by matching a section in the current picture toanother offset section within that same picture. The offset between thetwo sections may be coded as a motion vector MV′ that can be used thatfor pixel reconstruction at 406. By way of example, the encoder mayattempt to match a block or macroblock in an intra picture with someother offset section in the same picture then code the offset betweenthe two as a motion vector. The codec's ordinary motion vectorcompensation for an “inter” picture may then be used to do motion vectorcompensation on an “intra” picture. Certain existing codecs havefunctions that can convert an offset between two blocks or macroblocksinto a motion vector, which can be followed to do pixel reconstructionat 406. However, these functions are conventionally turned off forencoding of intra pictures. In some alternative implementations, thecodec may be instructed not to turn off such “inter” picture functionsfor encoding of intra pictures.

As used herein, pixel reconstruction refers to a technique fordescribing a picture in terms of the transformation of a reference imageto a currently processing image. The output of the pixel reconstruction406 is sometimes referred to as “decoded pixels”. In general, the pixelreconstruction 406 acts as a local decoder within the encoderimplementing the encoding process 400. Specifically, the pixelreconstruction 406 includes inter prediction IP₁ and (optionally) intraprediction IP₂ to get predicted pixels PP using the motion vector MV orMV′ from the image compression 404 and reference pixels from a picturein the reference list. Inverse quantization and inverse transformationIQX using the transform coefficients 407 from the image compression 404produce lossy residual pixels 405L which are added to the predictedpixels PP to generate decoded pixels 409. The decoded pixels 409 areinserted into the reference picture and are available for use in imagecompression 404 and pixel reconstruction 406 for a subsequent section ofthe currently-processing picture 401. After the decoded pixels have beeninserted, un-decoded pixels in the reference picture may undergo padding402

By way of example, and not by way of limitation, in one type of motioncompensation, known as block motion compensation (BMC), each image maybe partitioned into blocks of pixels (e.g. macroblocks of 16×16 pixels).Each block is predicted from a block of equal size in the referenceframe. The blocks are not transformed in any way apart from beingshifted to the position of the predicted block. This shift isrepresented by a motion vector MV. To exploit the redundancy betweenneighboring block vectors, (e.g. for a single moving object covered bymultiple blocks) it is common to encode only the difference between acurrent and previous motion vector in a bit-stream. The result of thisdifferencing process is mathematically equivalent to a global motioncompensation capable of panning. Further down the encoding pipeline, themethod 400 may optionally use entropy coding 408 to take advantage ofthe resulting statistical distribution of the motion vectors around thezero vector to reduce the output size.

Block motion compensation divides up a currently encoding image intonon-overlapping blocks, and computes a motion compensation vector thatindicates where those blocks come from in a reference image. Thereference blocks typically overlap in the source frame. Some videocompression algorithms assemble the current image out of pieces ofseveral different reference images in the reference image list 403. Moreinformation about coding and decoding methods can be found in commonlyowned U.S. Pat. No. 8,711,933 which is incorporated herein by reference.

According to aspects of the present disclosure the motion vector MV,(and/or intra prediction mode motion vector MV′) and transformcoefficients 407, collectively referred to herein as encoding parametersmay be provided to the second neural network 420. The second neuralnetwork is trained to predict the encoding parameters for the nextsection from the current section as discussed above. Once a predictionhas been made, the predicted encoding parameters the prediction error isdetermined at 421 by comparing the predicted encoding parametersprovided by the neural network 420 to the actual encoding parameters forthe next section. By way of example and not by way of limitation theprediction error may be a subtraction of the predicted encodingparameters from the actual encoding parameters for the next section. Ifthe result of the subtraction is zero then the encoding parameter hasbeen accurately predicted. Accurately predicted encoding parameters maybe dropped from encoding and will not be included in the coded picture411 or passed to the entropy encoder 408. If the result of the encodingerror determination is a non-zero number, the encoding error may be(optionally) encoded using entropy encoding 408 and included in thecoded picture 411. According to alternative aspects of the presentdisclosure if the result of the encoding error is a non-zero number thecorrect encoding parameter may be (optionally) encoded with entropyencoding 408 and included in the coded picture 411. By way of exampleand not by way of limitation the prediction error may be included slicedata or in the headers or portions of the headers of the coded pictures411.

It should be noted that for the first section or several sections theactual encoding parameter may be included in the coded picture 411.Determining the prediction error 421 may include determining whether thesection is an initial section or sections of the group of pictures andif it is determined that the section is an initial section or sectionsof the group of pictures then the encoding parameter for the section maybe (optionally) entropy encoded and included in the coded pictures 411without modification. This allows the neural network included in thedecoding system to have a correct starting point for prediction of theencoding parameters. Additionally the initial encoding parameters mayinclude a flag in the header which signals whether the encodingparameters are unaltered initial encoding parameters or a predictionerror.

In alternative embodiments of the present disclosure the first neuralnetwork is provided the results of the second neural network and(optionally) the prediction error. The first neural network is trainedpredict missing encoding parameters from encoding parameters of thecurrent section and/or a previous and next section. The first neuralnetwork may use the predicted encoding parameters from the second neuralnetwork and (optionally) the prediction error to produce a more accurateprediction of the encoding parameters. In some embodiments, to assist inthis process the first neural network may also be provided with theactual encoding parameters (determined through the above describedprocess) including both “before” and “after” parameters, as discussedabove. Similar to the results of the second neural network, theprediction error may be determined and included in the coded pictures.In alternative embodiments sections of encoded pictures may be flaggedfor prediction using the first NN. In other alternative embodiments analgorithm may be used to determine which encoding parameters for whichsection are to be predicted using the first NN, by way of example andnot by way of limitation one encoding parameter type may be determinedby the first NN while the other encoding parameters are determined bythe second NN or every other section may be predicted using the firstNN. In some alternative embodiments actual encoding parameters forcertain sections may be included in the coded pictures to enableprediction using the first NN. In other alternative implementations, abi-predictive first NN could be used in a hierarchical fashion. Forexample, sections 0, 4, 8 . . . may be predicted by the second(predictive) NN. Both sections 0 and 4 may then be used as inputs to thefirst NN to predict section 2. Then, sections 0 and 2 are used as theinput of another bi-predictive neural network to predict section 1.Sections 2 and 4 are used with yet another bi-predictive NN to predictsection 3.

The result of the padding 402, image compression 404 and pixelreconstruction 406, prediction error determination 421 and (optional)entropy coding 408 is a coded picture 411.

The Neural Network Enhanced Decoder System

The decoder system uses the second trained NN to predict the correctencoding parameters from a bitstream encoded as discussed above.Initially the encoded bit stream may be decoded with an entropy decoderallowing the parameter values to be extracted from the bit stream. Itshould be noted that the parameter values for very first section orseveral sections of the video stream may have all of the video encodingparameters included in the bit stream; this allows the NN to predict thenext parameter values for the next section accurately. The encodingparameters may by way of example and not by way of limitation beincluded coded slice data or in the frame headers for each frame ofvideo in the bit-stream, or in any other suitable location in thebitstream. The encoded bit stream may also include a prediction errorstream which may be combined with prediction made by the NN to generatethe corrected set of encoding parameters for the next section. Theprediction error may, for example, be encoded in to the headerinformation of the pictures.

In an alternative embodiment the second NN generated prediction resultplus the prediction error will be used as the input for the first NN.The first NN may use the parameters predicted by the second NN togenerate a more accurate prediction of parameters. In general, too manypredictions by the second NN will decrease the prediction accuracy.Similarly, too many predictions made by the first NN will decrease thenumber of available input parameters of both first and second NN and itcould also decrease the prediction accuracy. It is important to find outan optimal combination of first and second NN to achieve the bestoverall prediction accuracy. By way of example and not by way oflimitation, the second NN may be used to predict DCT coefficients. Then,both before and after DCT coefficients will be available for otherparameter predictions with the first NN. It should be noted that thefirst NN can only use available parameters as the input. Even if all DCTcoefficients are available, not all parameters in the future can be usedduring prediction. To continue the example, when MB coding type of MB1is the prediction target of the first NN, MB coding type of MB0 isavailable but MB code type of MB2 is not available. But, DCTcoefficients of MB2 predicted by the second NN are available thus thefirst NN will use the MB coding type of MB0 and the DCT coefficients ofMB2 to predict the MB coding type of MB1. In other alternativeembodiments the decoder may receive actual encoding parameters for thenext section and use the first NN for prediction of a current sectionwith the received actual encoding parameters for the next section andthe previous section's determined parameters. The first NN is“bi-predictive” and the second NN is “predictive”, as discussed above.Therefore, the second NN prediction result could be used as an input ofthe first NN. But, the first NN result cannot be used as the input ofthe second NN.

According to aspects of the present disclosure the corrected set ofencoding parameters may then be used in the decoding process.

Decoding Method

FIG. 5 illustrates an example of a possible process flow in a method 500for decoding of streaming data 501 that may be used in conjunction withembodiments of the present invention. This particular example shows theprocess flow for video decoding, e.g., using the AVC (H.264) standard.The coded streaming data 501 may initially be stored in a buffer. Wherecoded streaming data 501 (e.g., a video data bitstream) has beentransferred over a network, e.g., the Internet, the data 501 mayinitially undergo a process referred to as network abstraction layer(NAL) decoding, indicated at 502. NAL decoding may remove from the data501 information added to assist in transmitting the data. Suchinformation, referred to as a “network wrapper” may identify the data501 as video data or indicate a beginning or end of a bitstream, bitsfor alignment of data, and/or metadata about the video data itself. Suchmetadata may include a bit in a header that identifies a particularcoded frame as the first coded frame in a sequence of two or moreconsecutive successive frames that contain intra-coded subsections thatcan be used to form a patch frame. The metadata may also include theaforementioned flag in the header which signals whether the encodingparameters are unaltered initial encoding parameters or a predictionerror.

In addition, by way of example, the network wrapper may includeinformation about the data 501 including, e.g., resolution, picturedisplay format, color palette transform matrix for displaying the data,information on the number of bits in each picture, slice or macroblock,as well as information used in lower level decoding, e.g., dataindicating the beginning or ending of a slice. This information may beused to determine the number of macroblocks to pass to each of the taskgroups in a single section.

Due to its complexity, NAL decoding is typically done on a picture andslice level. The smallest NAL buffer used for NAL decoding is usuallyslice sized. Fortunately, the NAL decoding process 502 involves arelatively low number of cycles. Consequently, the NAL decoding process502 may be done on a single processor.

In some embodiments, after NAL decoding at 502, the remaining decodingillustrated in FIG. 5 may be implemented in three different threadgroups or task groups referred to herein as video coded layer (VCL)decoding 504, motion vector (MV) reconstruction 510 and picturereconstruction 514. The picture reconstruction task group 514 mayinclude pixel prediction and reconstruction 516 and post processing 520.These tasks groups may be chosen based on data dependencies such thateach task group may complete its processing of all the macroblocks in apicture (e.g., frame or field) or section before the macroblocks aresent to the next task group for subsequent processing.

Certain codecs may use a form of data compression that involvestransformation of the pixel information from a spatial domain to afrequency domain. One such transform, among others, is known as adiscrete cosine transform (DCT). The decoding process for suchcompressed data involves the inverse transformation from the frequencydomain back to the spatial domain. In the case of data compressed usingDCT, the inverse process is known as inverse discrete cosinetransformation (IDCT). The transformed data is sometimes quantized toreduce the number of bits used to represent numbers in the discretetransformed data. For example, numbers 1, 2, 3 may all be mapped to 2and numbers 4, 5, 6 may all be mapped to 5. To decompress the data aprocess known as inverse quantization (IQ) is used before performing theinverse transform from the frequency domain to the spatial domain. Thedata dependencies for the VCL IQ/IDCT decoding process 504 are typicallyat the macroblock level for macroblocks within the same slice.Consequently results produced by the VCL decoding process 504 may bebuffered at the macroblock level.

VCL decoding 504 often includes a process referred to as EntropyDecoding 506, which is used to decode the VCL syntax. Many codecs, suchas AVC (H.264), use a layer of encoding referred to as entropy encoding.Entropy encoding is a coding scheme that assigns codes to signals so asto match code lengths with the probabilities of the signals. Typically,entropy encoders are used to compress data by replacing symbolsrepresented by equal-length codes with symbols represented by codesproportional to the negative logarithm of the probability. AVC (H.264)supports two entropy encoding schemes, Context Adaptive Variable LengthCoding (CAVLC) and Context Adaptive Binary Arithmetic Coding (CABAC).Since CABAC tends to offer about 10% more compression than CAVLC, CABACis favored by many video encoders in generating AVC (H.264) bitstreams.Decoding the entropy layer of AVC (H.264)-coded data streams can becomputationally intensive and may present challenges for devices thatdecode AVC (H.264)-coded bitstreams using general purposemicroprocessors. To decode high bit-rate streams targeted by the Blu-rayor the HD-DVD standards, the hardware needs to be very fast and complex,and the overall system cost could be really high. One common solution tothis problem is to design special hardware for CABAC decoding.Alternatively, entropy decoding may be implemented in software. Anexample of a software implementation of entropy decoding may be found incommonly owned U.S. Pat. No. 8,749,409, to Xun Xu, filed Aug. 25, 2006and entitled “ENTROPY DECODING METHODS AND APPARATUS”, which isincorporated herein by reference.

In addition to Entropy Decoding 506, the VCL decoding process 504 mayinvolve inverse quantization (IQ) and/or inverse discrete cosinetransformation (IDCT) as indicated at 508. These processes may decodethe headers 509 and data from macroblocks. The decoded headers 509 maybe used to assist in VCL decoding of neighboring macroblocks.

According to aspects of the present invention the initially decodedheaders or portions of video metadata (e.g., slice data) may be providedto the Neural Network 505 which may predict subsequent headers orportions of video metadata. The portions of video metadata may then beinserted in to the headers 509 for use in the decoding process.Additionally according to the present invention the VCL decoding processmay decode an encoding error for each subsequent section from theencoded headers, the encoding error may be combined with the videometadata to correct incorrect predictions made by the Neural Network505. The video metadata may include the aforementioned flag in theheader which signals whether the encoding parameters are unalteredinitial encoding parameters or a prediction error. In someimplementations, the predictions from the neural network may be insertedinto the headers 509.

VCL decoding 504 and Neural Network Prediction 505 may be implemented ata macroblock level data dependency frequency. Specifically, differentmacroblocks within the same slice may undergo VCL decoding in parallelduring neural network prediction and the results may be sent to themotion vector reconstruction task group 510 for further processing.

Subsequently, all macroblocks in the picture or section may undergomotion vector reconstruction 510. The MV reconstruction process 510 mayinvolve motion vector reconstruction 512 using headers from a givenmacroblock 511 and/or co-located macroblock headers 513. A motion vectordescribes apparent motion within a picture. Such motion vectors allowreconstruction of a picture (or portion thereof) based on knowledge ofthe pixels of a prior picture and the relative motion of those pixelsfrom picture to picture. Once the motion vector has been recoveredpixels may be reconstructed at 516 using a process based on residualpixels from the VCL decoding process 504 and motion vectors from the MVreconstruction process 510. The data dependency frequency (and level ofparallelism) for the MV depends on whether the MV reconstruction process510 involves co-located macroblocks from other pictures. For MVreconstruction not involving co-located MB headers from other picturesthe MV reconstruction process 510 may be implemented in parallel at theslice level or picture level. For MV reconstruction involving co-locatedMB headers the data dependency frequency is at the picture level and theMV reconstruction process 510 may be implemented with parallelism at theslice level.

The results of motion vector reconstruction 510 are sent to the picturereconstruction task group 514, which may be parallelized on a picturefrequency level. Within the picture reconstruction task group 514 allmacroblocks in the picture or section may undergo pixel prediction andreconstruction 516 in conjunction with de-blocking 520. The pixelprediction and reconstruction task 516 and the de-blocking task 520 maybe parallelized to enhance the efficiency of decoding. These tasks maybe parallelized within the picture reconstruction task group 514 at amacroblock level based on data dependencies. For example, pixelprediction and reconstruction 516 may be performed on one macroblock andfollowed by de-blocking 520. Reference pixels from the decoded pictureobtained by de-blocking 520 may be used in pixel prediction andreconstruction 516 on subsequent macroblocks. Pixel prediction andreconstruction 518 produces decoded sections 519 (e.g. decoded blocks ormacroblocks) that include neighbor pixels which may be used as inputs tothe pixel prediction and reconstruction process 518 for a subsequentmacroblock. The data dependencies for pixel prediction andreconstruction 516 allow for a certain degree of parallel processing atthe macroblock level for macroblocks in the same slice.

Pixel prediction may use pixels from within the current picture that isbeing decoded as reference pixels instead of pixels from an alreadydecoded picture. Any reference pixels that have not been decoded may bereplaced by padding pixels, which may be determined from pixels withinthe current picture that have already been decoded. If no pixels havebeen decoded, the values of the padding pixels may be determinedarbitrarily as discussed above.

The post processing task group 520 may include a de-blocking filter 522that is applied to blocks in the decoded section 519 to improve visualquality and prediction performance by smoothing the sharp edges whichcan form between blocks when block coding techniques are used. Thede-blocking filter 522 may be used to improve the appearance of theresulting de-blocked sections 524.

The decoded section 519 or de-blocked sections 524 may provideneighboring pixels for use in de-blocking a neighboring macroblock. Inaddition, decoded sections 519 including sections from a currentlydecoding picture may provide reference pixels for pixel prediction andreconstruction 518 for subsequent macroblocks. It is during this stagethat pixels from within the current picture may optionally be used forpixel prediction within that same current picture as described above,independent of whether the picture (or subsections thereof) isinter-coded or intra-coded. De-blocking 520 may be parallelized on amacroblock level for macroblocks in the same picture.

The decoded sections 519 produced before post processing 520 and thepost-processed sections 524 may be stored in the same buffer, e.g., theoutput picture buffer depending on the particular codec involved. It isnoted that de-blocking is a post processing filter in H.264. BecauseH.264 uses pre-de-blocking macroblock as reference for neighboringmacroblocks intra prediction and post-de-blocking macroblocks for futurepicture macroblocks inter prediction. Because both pre- andpost-de-blocking pixels are used for prediction, the decoder or encoderhas to buffer both pre-de-blocking macroblocks and post-de-blockingmacroblocks. For most low cost consumer applications, pre-de-blockedpictures and post-de-blocked pictures share the same buffer to reducememory usage. For standards that pre-date H.264, such as MPEG2 or MPEG4except MPEG4 part 10, (note: H.264 is also called MPEG4 part 10), onlypre-post-processing macroblocks (e.g., pre-de-blocking macroblocks) areused as reference for other macroblock prediction. In such codecs, apre-filtered picture may not share the same buffer with a post filteredpicture.

Thus, for H.264, after pixel decoding, the decoded section 519 is savedin the output picture buffer. Later, the post processed sections 524replace the decoded sections 519 in the output picture buffer. Fornon-H.264 cases, the decoder only saves decoded sections 519 in theoutput picture buffer. The post processing is done at display time andthe post processing output may not share the same buffer as the decoderoutput picture buffer.

For most multi-processor hardware platforms, the inter processor dataaccess delay is shorter than the time interval between video pictures.However, only a few parallel processing engines can do inter-processordata transfer faster than the macroblock processing speed. It isacceptable to have two tasks exchange data at the picture frequency.Based on the picture frequency dependencies described above with respectto FIG. 3, it is possible to break up the decoding process 500 into fiveseparate tasks. These tasks are A) NAL decoding 502 and decoder internalmanagement, B) VCL syntax decoding and IQ/IDCT 504, C) motion vectorreconstruction 510 and D) pixel prediction and reconstruction 516 and E)de-blocking 520.

In general, NAL decoding may be done at a picture or slice level datadependency frequency. For codecs such as AVC (H.264) the datadependencies involved in NAL decoding 302 may be fairly complex yet theoverall NAL decoding process 502 may take a relatively low number ofcycles. Consequently it may be more efficient to implement all NALdecoding 502 on a single processor rather than to attempt to parallelizethis process. The motion vector reconstruction task 510 typically takesabout one tenth as many processor cycles as for VCL syntax decoding andIQ/IDCT 504, pixel prediction and reconstruction 516 and de-blocking520. The computational complexities of the latter three tasks are fairlysimilar. However, the execution cycle allocation among these three largecycle tasks is different for different coded video streams.

For some codecs, within the VCL syntax decoding and IQ/IDCT 504 thereare only macroblock level data dependencies within each slice but due tothe nature of Neural Network prediction there is greater dependencybetween slices. In some embodiments the dependencies are limited byperforming second and first NN prediction within a slice boundary. Thisapproach would dramatically limit the number of input parameters andreduce the prediction accuracy but would provide better errorresilience. The motion vector reconstruction task 510 depends on theoutput of the VCL syntax decoding and IQ/IDCT 504 for input. The pixelprediction and reconstruction task 516 takes the outputs of the VCLsyntax decoding and IQ/IDCT task 504 and motion vector reconstructiontask 510 as inputs. Within the motion vector reconstruction task 510 andpixel prediction and reconstruction task 518 there are macroblock leveldata dependencies, but slices within one picture are independent of eachother.

The pixel prediction and reconstruction task 516 may involve motioncompensation. The picture dependency in the pixel prediction andreconstruction task 516 may result from such motion compensation. Motioncompensation refers to adding residual pixels to reference pixelsfetched by motion vectors. The input of motion compensation is motionvector and residual pixels. The output of motion compensation is decodedpixels. As discussed above, motion compensation is a process thatnormally uses a previously decoded picture to predict the currentpicture. In the motion compensation process, a two-dimensional vector,called a motion vector, is used to reference the pixels in a previouslydecoded picture. The picture level dependency in the motion vectorreconstruction task 510 is caused by direct prediction. In directprediction, a previously decoded macroblock's motion vector is used tocalculate the current macroblock's motion vector. In an AVC decoder, thepreviously decoded reference picture is the output of the de-blockingtask 520. Because of limitations on motion vector ranges defined by thecoding standard, not all the pixels in the previous picture may beavailable to predict a certain macroblock in the current picture. Forexample, the motion vector range for an AVC level 4.1 stream is −512 to511.75 pixels vertically and −1024 to 1023.75 pixels horizontally. Ifthe picture size is 1920×1088 pixels, about one quarter of the pixels inthe reference picture can be used for prediction of a corner macroblock.By contrast, almost all of the pixels in the reference picture can beused for prediction of a center macroblock.

Note that in the example depicted in FIG. 5, there is no dependency loopbetween the VCL decoding and IQ/IDCT tasks 508 and any other tasks. Assuch, this task may be merged into any or all of the VCL decoding task504, motion vector reconstruction task 510 or pixel prediction andreconstruction task 516 to balance the task loads amongst availableprocessors. Because some blocks may not have DCT coefficients, mergingthe IQ/IDCT task 508 into the block syntax decoding loop can allow thedecoder to do IQ/IDCT only for coded blocks and reduce the number ofbranches. After all parameters have been reconstructed by the NN, aconventional decoding process still could be done on multiple processorsin parallel. In some implementations, a NN-based parameter predictionmay be done in parallel with another decoding process using pipelining.

The decoding method described above with respect to FIG. 3 may beimplemented in a single thread. Alternatively, the decoding method ofFIG. 3 may be implemented in multiple threads with a processing modulecapable of implementing parallel processing. In particular, differentsections of a picture may be processed in parallel. As used herein,processing in parallel means that, to some extent, the processing of twoor more different tasks overlaps in time.

Computing Device

FIG. 6 depicts a system according to aspects of the present disclosure.The system may include a computing device 600 coupled to a user inputdevice 602. The user input device 602 may be a controller, touch screen,microphone, keyboard, mouse, light pen, or other device that allows theuser to input control data in to the system.

The computing device 600 may include one or more processor units 603,which may be configured according to well-known architectures, such as,e.g., single-core, dual-core, quad-core, multi-core,processor-coprocessor, cell processor, and the like. The computingdevice may also include one or more memory units 604 (e.g., randomaccess memory (RAM), dynamic random access memory (DRAM), read-onlymemory (ROM), and the like).

The processor unit 603 may execute one or more programs, portions ofwhich may be stored in the memory 604 and the processor 603 may beoperatively coupled to the memory, e.g., by accessing the memory via adata bus 605. The programs may be configured to implement training of aFirst NN 610. Additionally the Memory 604 may contain programs thatimplement training of a second NN 621. The Memory 604 may also containprograms to encode 608 and/or decode video 622. The Memory 604 may alsocontain software modules such as a First NN Module 610 and a Second NNModule 621. The overall structure and probabilities of the NNs may alsobe stored as data 618 in the Mass Store 615. The processor unit 603 isfurther configured to execute one or more programs 617 stored in themass store 615 or in memory 604 which cause processor to carry out themethod 200 of training a first NN 610 from feature data and/or themethod 300 of training a second NN. The system may generate NeuralNetworks as part of the NN training process. These Neural Networks maybe stored in memory 604 as part of the First NN Module 621 or second NNModule 610. Completed NNs may be stored in memory 604 or as data 618 inthe mass store 615. The programs 617 (or portions thereof) may also beconfigured, e.g., by appropriate programming, to encode, un-encodedvideo or decoded encoded video according to the method of FIGS. 4 and 5

The computing device 600 may also include well-known support circuits,such as input/output (I/O) 607, circuits, power supplies (P/S) 611, aclock (CLK) 612, and cache 613, which may communicate with othercomponents of the system, e.g., via the bus 605. The computing devicemay include a network interface 614. The processor unit 603 and networkinterface 614 may be configured to implement a local area network (LAN)or personal area network (PAN), via a suitable network protocol, e.g.,Bluetooth, for a PAN. The computing device may optionally include a massstorage device 615 such as a disk drive, CD-ROM drive, tape drive, flashmemory, or the like, and the mass storage device may store programsand/or data. The computing device may also include a user interface 616to facilitate interaction between the system and a user. The userinterface may include a display monitor, head mounted display, 7 segmentdisplay or other device.

The computing device 600 may include a network interface 614 tofacilitate communication via an electronic communications network 620.The network interface 614 may be configured to implement wired orwireless communication over local area networks and wide area networkssuch as the Internet. The device 600 may send and receive data and/orrequests for files via one or more message packets over the network 620.Message packets sent over the network 620 may temporarily be stored in abuffer 609 in memory 604.

While the above is a complete description of the preferred embodiment ofthe present invention, it is possible to use various alternatives,modifications and equivalents. Therefore, the scope of the presentinvention should be determined not with reference to the abovedescription but should, instead, be determined with reference to theappended claims, along with their full scope of equivalents. Any featuredescribed herein, whether preferred or not, may be combined with anyother feature described herein, whether preferred or not. In the claimsthat follow, the indefinite article “A”, or “An” refers to a quantity ofone or more of the item following the article, except where expresslystated otherwise. The appended claims are not to be interpreted asincluding means-plus-function limitations, unless such a limitation isexplicitly recited in a given claim using the phrase “means for.”

What is claimed is:
 1. A method for training a video encoder/decodersystem the method comprising: a) generating at least two sets of videoencoding parameters wherein the at least two sets of video encodingparameters are valid; b) masking a set of the at least two sets ofencoding parameters with invalid values to generate an invalid set ofvideo encoding parameters; c) providing the at least two sets of videoencoding parameters to one or more neural networks; d) training the oneor more neural networks to predict valid values corresponding to valuesof the invalid set using an iterative training algorithm; e) determiningwhich encoding parameters need to be encoded based on analysis of aprediction error of the one or more neural networks; f) dropping theencoding parameters from the encoded data which are determined to beaccurately predicted by the one or more neural networks; g) encoding anew video stream without the dropped encoding parameters.
 2. The methodof claim 1, wherein the one or more neural networks include abi-predictive neural network and a predictive neural network, wherein c)includes providing one or more parameters before a current parameter tobe predicted to the predictive neural network and providing one or moreparameters before the current parameter to be predicted and one or moreparameters after the current parameter to be predicted to thebi-predictive neural network, wherein the one or more parameters afterthe current parameter to be predicted include one or more parameterspredicted by the predictive neural network.
 3. The method of claim 2,wherein the invalid set of video encoding parameters are for a currentsection, wherein d) includes iteratively training the bi-predictiveneural network to predict encoding parameters for the current sectionusing parameters before the current parameter to be predicted and afterthe current parameter to be predicted.
 4. The method of claim 2, whereinthe invalid set of video encoding parameters are for a current section,wherein d) includes iteratively training the bi-predictive neuralnetwork to predict encoding parameters for the current section usingparameters for sections before and after the current section andtraining the predictive neural network to predict parameters for thecurrent section using parameters for a section before the currentsection.
 5. The method of claim 1 wherein the invalid set of encodingparameters are a single type of encoding parameter, wherein another setin the at least two sets of video encoding parameters are of at leastanother different encoding parameter type and wherein the one or moreneural networks are trained to predict a correct set of encodingparameters from the another set of video encoding parameters usingiterative training.
 6. The method of claim 1 wherein a prediction errorcomponent is added to the video stream at e).
 7. The method of claim 1wherein the masked set of encoding parameters are provided to the neuralnetwork after all of the valid encoding parameters.
 8. A method forvideo encoding the method comprising: a) determining video encodingparameters for a section from an unencoded video stream with a videoencoder; b) providing the video encoding parameters for the section toone or more trained neural networks wherein the one or more trainedneural networks are trained to predict other video encoding parameters;c) predicting other video encoding parameters from the provided videoencoding parameters with the one or more trained neural networks; d)determining a prediction error of the predicted other video encodingparameters from the one or more neural networks and actual encodingparameters from the video encoder; e) encoding the unencoded videostream without encoding parameters for sections that have no predictionerror.
 9. The method of claim 8 wherein d) further comprises encodingthe prediction error for sections of the video stream that have errorsin prediction.
 10. The method of claim 8 wherein d) further comprisesencoding the correct encoding parameter for sections of the video streamthat have errors in prediction.
 11. The method of claim 8 wherein theone or more trained neural networks include a predictive neural networkand a bi-predictive neural network.
 12. The method of claim 11 whereinc) includes providing an encoding parameter predicted by the predictiveneural network as an input to the bi-predictive neural network.
 13. Themethod of claim 8 wherein an encoding parameter for an initial sectionof the video stream is always encoded.
 14. The method of claim 8 whereinthe video parameters provided in b) and prediction made in c) arelimited to within a slice boundary to remove dependencies betweenslices.
 15. A method for decoding a video stream with a neural networkcomprising: a) receiving an encoded video stream wherein the encodedvideo stream has video encoding parameters for at least a section in theencoded video stream; b) extracting the video encoding parameters forthe at least a section from the encoded video stream; c) providing theat least a section video encoding parameters to one or more neuralnetworks trained to predict other video encoding parameters; d)predicting the other video encoding parameters from the provided videoencoding parameters with the one or more neural networks; e) decodingthe video stream using the predicted video encoding parameters and theencoded video stream; f) displaying the decoded video stream on adisplay.
 16. The method of claim 15 wherein the one or more neuralnetworks include a predictive neural network and a bi-predictive neuralnetwork.
 17. The method of claim 16 wherein d) includes providing anencoding parameter predicted by the predictive neural network as aninput to the bi-predictive neural network.
 18. The method of claim 15wherein b) further comprises extracting a prediction error from theencoded video stream.
 19. The method of claim 18 wherein d) furthercomprises correcting the predicted video encoding parameters with theprediction error.
 20. The method of claim 15 wherein the videoparameters provided in b) and prediction made in c) are limited towithin a slice boundary to remove dependencies between slices.
 21. Asystem comprising: a processor; a neural network trained to predictparameter values; a memory operatively coupled to the processor; thememory having embodied thereon instructions for video encoding, thememory further including instructions to carry out a method for improvedvideo encoding, the method comprising; a) determining video encodingparameters for a section from an unencoded video stream with a videoencoder; b) providing the video encoding parameters to one or moretrained neural networks wherein the neural network is trained to predictother video encoding parameters; c) predicting the other video encodingparameters with the trained neural network; d) determining a predictionerror of the predicted encoding parameters from the neural network andactual encoding parameters from the video encoder; e) encoding theunencoded video stream without encoding parameters for sections thathave no prediction error.
 22. The system of claim 21, wherein the one ormore trained neural networks include a predictive neural network and abi-predictive neural network.
 23. The system of claim 21 wherein c)includes providing an encoding parameter predicted by the predictiveneural network as an input to the bi-predictive neural network.
 24. Asystem comprising; a processor; a neural network trained to predictencoding parameter values; a memory operatively coupled to theprocessor; the memory having embodied thereon instructions for videodecoding, the memory further including instructions to carry out amethod for improved video decoding, the method comprising; a) receivingan encoded video stream wherein the encoded video stream has videoencoding parameters for at least a section in the encoded video stream;b) extracting the video encoding parameters for the at least a sectionfrom the encoded video stream; c) providing the video encodingparameters for the at least a section to one or more neural networkswherein the neural network is trained predict other video encodingparameters; d) predicting other video encoding parameters from videoencoding parameters for the at least a section with the trained neuralnetwork; e) decoding the video stream using the predicted video encodingparameters and the encoded video stream; f) displaying the decoded videostream on a display.
 25. The system of claim 24 wherein the one or moreneural networks include a predictive neural network and a bi-predictiveneural network.
 26. The system of claim 25 wherein d) includes providingan encoding parameter predicted by the predictive neural network as aninput to the bi-predictive neural network.
 27. The system of claim 24wherein b) further comprises extracting a prediction error from theencoded video stream and d) further comprises correcting the predictednext section video encoding parameters with the prediction error.